#ifndef INTERFACE_H
#define INTERFACE_H
/********************************************************************************
**
********************************************************************************/

#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QComboBox>
#include <QtGui/QDockWidget>
#include <QtGui/QGridLayout>
#include <QtGui/QGroupBox>
#include <QtGui/QHeaderView>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QSpacerItem>
#include <QtGui/QStatusBar>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
#include <QtGui/QLabel>
#include "qwt_slider.h"
#include "plot.h"
#include "string"
#include <QObject>
#include <QDateTime>
#include <indice.h>
#include <bollingerbands.h>
#include <QtGui/QSpinBox>
#include <trix.h>

#include "candelabrodb.h"

QT_BEGIN_NAMESPACE

        class Interface : public QMainWindow
{
    Q_OBJECT
public:
    QAction *actionFechar;
    QAction *actionImportToDatabase;
    QWidget *centralwidget;
    QGridLayout *gridLayout_6;

    QGridLayout *gridbox2;
    QGroupBox *mainBox;
    QVBoxLayout *verticalBox;
    QGroupBox *boxIntervalo;
    QGridLayout *gridBox3;
    QwtSlider *SliderIntervalo;
    QLabel *labelBox;
    QGroupBox *boxAcao;
    QGridLayout *gridBox4;
    QComboBox *comboAcao;
    QGridLayout *gridBox;
    QVBoxLayout *verticalBox_gb1;
    QSpinBox *intervalo_acao;
    int inter_acao;
    QLabel *l_intervalo_acao;
    //group box - didi
    QGroupBox *didi;
    QGridLayout *gridLayout_gb1;
    QLabel *l_didi1;
    QLabel *l_didi2;
    QLabel *l_didi3;
    QSpinBox *sb_didi1;
    QSpinBox *sb_didi2;
    QSpinBox *sb_didi3;
    QSpacerItem *hS_didi1;
    QSpacerItem *hS_didi2;
    //group box - bandas de boillinger
    QGroupBox *bandas;
    QGridLayout *gridLayout_bandas;
    QLabel *l_bandas;
    QSpinBox *sb_bandas;
    //group box - ADX
    QGroupBox *adx;
    QGridLayout *gridLayout_adx1;
    QLabel *l_adx1;
    QSpinBox *sb_adx1;
    //group box - TRIX
    QGroupBox *trix;
    QGridLayout *gridLayout_trix;
    QLabel *l_trix1;
    QLabel *l_trix2;
    QSpinBox *sb_trix1;
    QSpinBox *sb_trix2;
    QSpacerItem *hS_trix1;
    QSpacerItem *hS_trix2;
    //estocastico
    QGroupBox *est;
    QGridLayout *gridLayout_est;
    QLabel *l_est;
    QSpinBox *sb_est;
    //tela
    int h, w;
    int intervalo;
    double sliderMaior, sliderValorOrig; //Slider maior
    //variaveis
    int bb_periodo;
    int didi_curta;
    int didi_inter;
    int didi_longa;
    int adx_periodo;
    int trix_n_dias;
    int trix_q_dias;
    int w_dock;
    int est_periodo;

    QMenuBar *menubar;
    QMenu *menuArquivo;
    QStatusBar *statusbar;
    QDockWidget *dock1;
    QWidget *dockWidgetContents;
    QGridLayout *gridLayout;
    Plot *qwtPlot;
    QDockWidget *dock2;
    QWidget *dockWidgetContents_2;
    QGridLayout *gridLayout_2;
    Plot *qwtPlot_3;
    QDockWidget *dock3;
    QWidget *dockWidgetContents_3;
    QGridLayout *gridLayout_3;
    Plot *qwtPlot_2;
    QDockWidget *dock4;
    QWidget *dockWidgetContents_4;
    QGridLayout *gridLayout_4;
    Plot *qwtPlot_4;
    QDockWidget *dock5;
    QWidget *dockWidgetContents_5;
    QGridLayout *gridLayout_5;
    Plot *qwtPlot_5;
    QDockWidget *slider;
    QWidget *dockWidgetContents_7;
    QGridLayout *gridLayout_8;
    QwtSlider *Slider_2;

    CandelabroDB *db;

    OHLCVSet data_db;
    QString toDateTime(QwtDoubleInterval minValue);




    void inicializarVariaveis();
    void setupUi();
    void retranslateUi();
    void setDataCandleStick(QString nome, int periodo);
    void setData(int ponteiro, int intervalo);
    void configurarMenuImportacao();
    void configurarComboboxAcao();

public slots:
    void setIntervalo(double slider);
    void setAxisMinMax(double slider);
    void setVariaveis();
    void setBandasPeriodo(int x);
    void abrirJanelaImportacaoParaBanco();
    void atualizarBoxAcao();
    void mudarAcaoDaTela();
};

namespace Ui {
    class MainWindow: public Interface {};
} // namespace Ui

QT_END_NAMESPACE


#endif // INTERFACE_H
